import {Pager} from '../../shared/model/pager.model';

export const RolePageConfig = {
  title: '角色管理',
  table: 'sysRole',
  controller: 'sysRole',
  search: {
    // columnCount: '3,3,6',
    columnCount: 4,
    fieldLabel: [4, 8],
    data: {},
    cols: [
      { field: 'roleName', label: '角色名', input: 'text' },
      { field: 'enabled', label: '是否已激活', input: 'select', isYesNo: true },
    ]
  },
  list: {
    title: '角色列表',
    data: [],
    cols: [
      { field: 'roleName', header: '角色名'},
      { field: 'enabled', header: '是否启用' , isYesNo: true},
      { field: 'isSuperManager', header: '超级管理员', isYesNo: true},
      { field: 'description', header: '描述'},
    ],
    pager: new Pager({pageSize: 10, pageLinks: 3, rowsPerPageOptions: [3, 5, 7]}),
    // loading: false
  },
  dialog: {
    cols: [
      { field: 'roleName', label: '角色名', validates: { required: '', minlength: '最小长度为4.' } },
      { field: 'enabled', label: '是否启用' },
      { field: 'description', label: '描述' },
    ],
    add: { header: '新增角色', width: '600', },
    edit: { header: '修改角色', width: '600' }
  }
}
